package ren.kane.asdppp.transaction.change.classification;

import ren.kane.asdppp.classification.CommissionedClassification;
import ren.kane.asdppp.classification.PaymentClassification;
import ren.kane.asdppp.schedule.BiweeklySchedule;
import ren.kane.asdppp.schedule.PaymentSchedule;

/**
 * @author renrk(1275) on 2019-04-20 9:18 PM
 **/
public class ChangeCommissionedTransaction extends ChangeClassificationTransaction {

    private double salary;

    private double commissionRate;

    public ChangeCommissionedTransaction() {
    }

    public ChangeCommissionedTransaction(int empId, double salary, double commissionRate) {
        super(empId);
        this.salary = salary;
        this.commissionRate = commissionRate;
    }

    @Override
    protected PaymentClassification getClassification() {
        return new CommissionedClassification(salary, commissionRate);
    }

    @Override
    protected PaymentSchedule getSchedule() {
        return new BiweeklySchedule();
    }
}
